package com.team.easybuy.service;

import com.team.easybuy.entity.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

public interface UserService {

    User checkLogin(User user, HttpServletRequest req, HttpServletResponse resp);

    boolean addUser(User user);

    boolean containsByParams(Map<String, Object> params);

    User getUser(HttpServletRequest req, HttpServletResponse resp);

    void loginOut(HttpServletRequest req, HttpServletResponse resp);

    boolean editUser(User user, HttpServletRequest req, HttpServletResponse resp);

    boolean editPwd(Map<String, Object> params, HttpServletRequest req, HttpServletResponse resp);

    User findByNameAndPwd(Map<String, Object> params);

    List<User> pageByUser(Map<String, Object> params);

    User findById(Integer id);

    boolean editUserType(User user);

    boolean delUser(Integer id);

    User getUserByMobile(String mobile);

    User getUserByEmail(String email);

    boolean sendEmailCode( String emailReceiver);

    Boolean checkEmailCode(String emailReceiver,String inputCode);

    boolean resetPwd(User user);

    boolean checkRedis(Integer id);
}
